//
//  WeAuctionPublichTextView.m
//  WeGalaxy
//
//  Created by Zheng on 2017/6/30.
//  Copyright © 2017年 Zheng. All rights reserved.
//

#import "WeAuctionPublichTextView.h"

@interface WeAuctionPublichTextView () <UITextViewDelegate>


@end

@implementation WeAuctionPublichTextView

- (void)setTop:(CGFloat)top {
    _top = top;
    
    [_placeHolderLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(5);
        make.top.mas_equalTo(_top);
        make.right.equalTo(self);
    }];
}

- (instancetype)init {
    self = [super init];
    if (self) {
        self.delegate = self;
        
        [self addSubview:self.placeHolderLbl];
        
    }
    return self;
}

- (UILabel *)placeHolderLbl {
    if (!_placeHolderLbl) {
        _placeHolderLbl = [[UILabel alloc] init];
        _placeHolderLbl.text = @"这是发拍的描述";
        _placeHolderLbl.textColor = kRGB_COLOR(200, 199, 204, 1);
        _placeHolderLbl.font = kCX_FONT(14);
    }
    return _placeHolderLbl;
}

- (void)textViewDidChange:(UITextView *)textView {
    if (textView.hasText) {
        _placeHolderLbl.hidden = YES;
    } else {
        _placeHolderLbl.hidden = NO;
    }
}





@end
